;Assembler header file for TextArea
;written by DefMod (Dec 31 2005) on Sat Dec 31 14:07:20 2005
;Tom Hughes, tom@compton.nu, 14 Mar 1999

        [       :LNOT: :DEF: TextArea_Hdr
        GBLS    TextArea_Hdr

        [       :LNOT: :DEF: Get_Types
        GBLS    Get_Types
        ]
        [       :LNOT: :DEF: Types_Hdr
Get_Types                       SETS    "GET oslib/Types.Hdr"
        |
Get_Types                       SETS    ""
        ]
        $Get_Types

        [       :LNOT: :DEF: Get_OS
        GBLS    Get_OS
        ]
        [       :LNOT: :DEF: OS_Hdr
Get_OS                          SETS    "GET oslib/OS.Hdr"
        |
Get_OS                          SETS    ""
        ]
        $Get_OS

        [       :LNOT: :DEF: Get_Toolbox
        GBLS    Get_Toolbox
        ]
        [       :LNOT: :DEF: Toolbox_Hdr
Get_Toolbox                     SETS    "GET oslib/Toolbox.Hdr"
        |
Get_Toolbox                     SETS    ""
        ]
        $Get_Toolbox

        [       :LNOT: :DEF: Get_Gadget
        GBLS    Get_Gadget
        ]
        [       :LNOT: :DEF: Gadget_Hdr
Get_Gadget                      SETS    "GET oslib/Gadget.Hdr"
        |
Get_Gadget                      SETS    ""
        ]
        $Get_Gadget

;Symbols for constants
Class_TextArea                  *       &4018
TextArea_StateHasVerticalScrollbar *       &1
TextArea_StateHasHorizontalScrollbar *       &2
TextArea_StateWordwrappingEnabled *       &4
TextArea_AllowSelection         *       &8
TextArea_AllowSave              *       &10
TextArea_AllowLoad              *       &20
TextArea_Clipboard              *       &40
TextArea_AutoScroll             *       &80
TextArea_GetSelectionReturnText *       &1
TextArea_SetColourDesktop       *       &1

;Symbols for structure offsets and sizes
                                ^       0
TextArea_Gadget_type            #       Int
TextArea_Gadget_event           #       Int
TextArea_Gadget_text            #       Toolbox_MsgReference
TextArea_Gadget_foreground      #       OS_Colour
TextArea_Gadget_background      #       OS_Colour
TextArea_Gadget                 *       @

                                ^       0
TextArea_Object                 Gadget_Object_MEMBERS
TextArea_Object_type            #       Int
TextArea_Object_event           #       Int
TextArea_Object_text            #       Toolbox_MsgReference
TextArea_Object_foreground      #       OS_Colour
TextArea_Object_background      #       OS_Colour
TextArea_Object                 *       @

                                ^       0
                                #       Bits
TextArea_State                  *       @

                                ^       0
                                #       Bits
TextArea_GetSelectionFlags      *       @

                                ^       0
                                #       Bits
TextArea_SetColourFlags         *       @

                                ^       0
TextArea_Colour_real            #       OS_Colour
                                ^       0
TextArea_Colour_desktop         #       Wimp_Colour
TextArea_Colour                 *       @


;Symbols for SWI's and SWI reason codes
TextArea_GetState               *       &4018
   ;Entry
   ;  R0 = flags (Bits)
   ;  R1 = window (Toolbox_O)
   ;  R2 = &4018
   ;  R3 = text_area (Toolbox_C)
   ;Exit
   ;  R0 = state (TextArea_State)

TextArea_SetState               *       &4019
   ;Entry
   ;  R0 = flags (Bits)
   ;  R1 = window (Toolbox_O)
   ;  R2 = &4019
   ;  R3 = text_area (Toolbox_C)
   ;  R4 = state (TextArea_State)

TextArea_SetText                *       &401A
   ;Entry
   ;  R0 = flags (Bits)
   ;  R1 = window (Toolbox_O)
   ;  R2 = &401A
   ;  R3 = text_area (Toolbox_C)
   ;  R4 -> text (String)

TextArea_GetTextSize            *       &401B
   ;Entry
   ;  R0 = flags (Bits)
   ;  R1 = window (Toolbox_O)
   ;  R2 = &401B
   ;  R3 = text_area (Toolbox_C)
   ;  R4 = &0
   ;Exit
   ;  R5 = buffer_size (Int)

TextArea_GetText                *       &401B
   ;Entry
   ;  R0 = flags (Bits)
   ;  R1 = window (Toolbox_O)
   ;  R2 = &401B
   ;  R3 = text_area (Toolbox_C)
   ;  R4 = buffer (pointer to String)
   ;  R5 = buffer_size (Int)
   ;Exit
   ;  R5 = length (Int)

TextArea_InsertText             *       &401C
   ;Entry
   ;  R0 = flags (Bits)
   ;  R1 = window (Toolbox_O)
   ;  R2 = &401C
   ;  R3 = text_area (Toolbox_C)
   ;  R4 = insert_at (Int)
   ;  R5 -> text (String)

TextArea_ReplaceText            *       &401D
   ;Entry
   ;  R0 = flags (Bits)
   ;  R1 = window (Toolbox_O)
   ;  R2 = &401D
   ;  R3 = text_area (Toolbox_C)
   ;  R4 = start (Int)
   ;  R5 = end (Int)
   ;  R6 -> text (String)

TextArea_GetSelection           *       &401E
   ;Entry
   ;  R0 = flags (TextArea_GetSelectionFlags)
   ;  R1 = window (Toolbox_O)
   ;  R2 = &401E
   ;  R3 = text_area (Toolbox_C)
   ;Exit
   ;  R4 = start (Int)
   ;  R5 = end (Int)

TextArea_GetSelectionTextSize   *       &401E
   ;Entry
   ;  R0 = &1 :OR: flags (TextArea_GetSelectionFlags)
   ;  R1 = window (Toolbox_O)
   ;  R2 = &401E
   ;  R3 = text_area (Toolbox_C)
   ;  R4 = &0
   ;Exit
   ;  R5 = buffer_size (Int)

TextArea_GetSelectionText       *       &401E
   ;Entry
   ;  R0 = &1 :OR: flags (TextArea_GetSelectionFlags)
   ;  R1 = window (Toolbox_O)
   ;  R2 = &401E
   ;  R3 = text_area (Toolbox_C)
   ;  R4 = buffer (pointer to String)
   ;  R5 = buffer_size (Int)
   ;Exit
   ;  R5 = length (Int)

TextArea_SetSelection           *       &401F
   ;Entry
   ;  R0 = flags (Bits)
   ;  R1 = window (Toolbox_O)
   ;  R2 = &401F
   ;  R3 = text_area (Toolbox_C)
   ;  R4 = start (Int)
   ;  R5 = end (Int)

TextArea_SetFont                *       &4020
   ;Entry
   ;  R0 = flags (Bits)
   ;  R1 = window (Toolbox_O)
   ;  R2 = &4020
   ;  R3 = text_area (Toolbox_C)
   ;  R4 -> font_name (String)
   ;  R5 = width (Int)
   ;  R6 = height (Int)

TextArea_SetColour              *       &4021
   ;Entry
   ;  R0 = flags (TextArea_SetColourFlags)
   ;  R1 = window (Toolbox_O)
   ;  R2 = &4021
   ;  R3 = text_area (Toolbox_C)
   ;  R4 = foreground (TextArea_Colour)
   ;  R5 = background (TextArea_Colour)

TextArea_GetColour              *       &4022
   ;Entry
   ;  R0 = flags (Bits)
   ;  R1 = window (Toolbox_O)
   ;  R2 = &4022
   ;  R3 = text_area (Toolbox_C)
   ;Exit
   ;  R0 = foreground (OS_Colour)
   ;  R1 = background (OS_Colour)

TextArea_SetTextBorder          *       &4023
   ;Entry
   ;  R0 = flags (Bits)
   ;  R1 = window (Toolbox_O)
   ;  R2 = &4023
   ;  R3 = text_area (Toolbox_C)
   ;  R4 = border_size (Int)

        ]
        END
